// pages/member/collection.js
var app = getApp
Page({
  data: {
    selectedAllStatus: true,
    point: 3500,
    imgwidth: 0,
    imgheight: 0,
    imgwidth2: 0,
    imgheight2: 0,
    moneynumber: 0,
    infoMess: '',
  },
  usermoneyInput: function (e) {
    this.setData({
      moneynumber: e.detall.value
    })
  },
  payClick: function (e) {
    if (this.data.moneynumber == 0) {
      this.setData({
        infoMess: '温馨提示：输入金额不能为空！',
      })
    }
  },
  imageLoad: function (e) {
    var _this = this;
    var $width = e.detail.width,    //获取图片真实宽度  
      $height = e.detail.height,
      ratio = 1;   //图片的真实宽高比例  
    var viewHeight = 44,           //设置图片显示宽度，  
      viewWidth = 44 / ratio;    //计算的高度值     
    this.setData({
      imgwidth: viewWidth,
      imgheight: viewHeight
    })
  },
  Loadtwo: function (e) {
    var _this = this;
    var $width = e.detail.width,    //获取图片真实宽度  
      $height = e.detail.height,
      ratio = 1;   //图片的真实宽高比例  
    var viewHeight2 = 50,           //设置图片显示宽度，  
      viewWidth2 = 50 / ratio;    //计算的高度值     
    this.setData({
      imgwidth2: viewWidth2,
      imgheight2: viewHeight2
    })
  },

  bindSelectAll: function () {
    // 环境中目前已选状态
    var selectedAllStatus = this.data.selectedAllStatus;
    // 取反操作
    selectedAllStatus = !selectedAllStatus;
    this.setData({
      selectedAllStatus: selectedAllStatus,
    });
  }
})